﻿@{
    ViewBag.Title = "找回密码";
    Layout = "~/Views/Shared/_LoginLayout.cshtml";
}
@Scripts.Render("~/Scripts/Identify")
<el-tabs class="h-tabs" v-model="state.identifyType" v-on:tab-change="tabOnChange">
    <el-tab-pane label="短信找回" name="phone"></el-tab-pane>
    <el-tab-pane label="邮件找回" name="email"></el-tab-pane>
</el-tabs>
<el-form ref="ruleFormRef" :model="state" :rules="rules">
    <p class="help-line">{{helpLineText}}</p>
    <el-form-item prop="phone" v-if="state.identifyType === 'phone'">
        <el-input v-model="state.phone" placeholder="手机号">
            <template #prepend>
                <el-select class="register-form__phone-prefix phone-prefix-select" v-model="state.num" placeholder="请选择">
                    <el-option label="+86" value="86">
                        <span>+86（中国）</span>
                    </el-option>
                </el-select>
            </template>
        </el-input>
    </el-form-item>
    <el-form-item prop="phoneCode" v-if="state.identifyType === 'phone'">
        <el-input v-model="state.phoneCode" placeholder="验证码">
            <template #append>
                <el-button :disabled="codeConfig.disabled" type="text" v-on:click="getCodeBtnOnClick">{{codeConfig.text}}</el-button>
            </template>
        </el-input>
    </el-form-item>
    <el-form-item prop="email" v-if="state.identifyType === 'email'">
        <el-input v-model="state.email" placeholder="邮箱"></el-input>
    </el-form-item>
    <el-form-item>
        <el-button class="is-block" size="large" type="primary" v-on:click="subitForm(ruleFormRef)">重置密码</el-button>
    </el-form-item>
    <section class="flex-container" style="justify-content: center; align-items: stretch; align-self: auto;">
        <a href="@Url.Action("Index","Login")">返回登录</a>
    </section>
</el-form>
